//
//  TestVC.m
//  K-Music
//
//  Created by CHUN on 16/6/21.
//  Copyright © 2016年 CHUN. All rights reserved.
//

#import "TestVC.h"

@interface TestVC ()

@end

@implementation TestVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    //返回按钮
    UIButton *enterBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    enterBtn.frame = CGRectMake(0, 0, 45, 30);
    [enterBtn setTitle:@"取消" forState:UIControlStateNormal];
    [enterBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [enterBtn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:enterBtn];
    
    // Do any additional setup after loading the view.
}


-(void)back{
    [self dismissViewControllerAnimated:YES completion:^{
        self.view = nil;
    }];
}




//买家入口按钮跳转事件
- (void)consumenBtnClick
{
    NSString *str = [FileStorage NSUserDefault_getObjectForKey:User_id];
    if ([str isEqual:@""] || str == nil) {
        LoginVC * login  = [[LoginVC alloc] init];
        UINavigationController* navi = [[UINavigationController alloc]initWithRootViewController:login];
        [self presentViewController:navi animated:YES completion:^{
            
        }];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
